package com.ajavaer.framework.orm.po;

import com.ajavaer.framework.core.orm.po.AuditingPo;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;

import javax.persistence.MappedSuperclass;
import javax.persistence.Transient;

@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "userType",defaultImpl = UserAdmin.class)
@JsonSubTypes({
        @JsonSubTypes.Type(value = UserFront.class, name = "UserFront"),
        @JsonSubTypes.Type(value = UserAdmin.class, name = "UserAdmin"),
})
@MappedSuperclass
public class User extends AuditingPo {

    private String account;
    private String password;
    @Transient
    private String userType;

    public String getUserType() {
        return userType;
    }

    public void setUserType(String userType) {
        this.userType = userType;
    }

    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }


}
